<?php 

namespace App\Http\Middleware;

class HandFrontView {

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  $next
     * @return mixed
     */
    public function handle($request, $next)
    {
        $response = $next($request);
        $finder = app('view')->getFinder();
        $finder->prependLocation(resource_path('views/front'));

        return $response;
    }

}